﻿@model TamoCRM.Web.Mvc.Areas.Admin.Models.ContactTmps.ContactTmpModel
@{
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}
@{
    
}
<style type="text/css">
    .btn-import {
        display: inline-block;
        color: #FFF!important;
        text-shadow: 0 -1px 0 rgba(0,0,0,0.25)!important;
        background-image: none!important;
        border-radius: 0;
        box-shadow: none!important;
        -webkit-transition: all ease .15s;
        transition: all ease .15s;
        cursor: pointer;
        vertical-align: middle;
        margin: 0;
        position: relative;
        font-size: 13px;
        padding: 4px 9px;
        line-height: 1.39;
    }
</style>
<div class="breadcrumbs" id="breadcrumbs">
    <script type="text/javascript">
        try { ace.settings.check('breadcrumbs', 'fixed') } catch (e) { }
    </script>

    <ul class="breadcrumb">
        <li>
            <i class="icon-home home-icon"></i>
            <a href="/Home">Trang chủ</a>
        </li>

        <li>
            <a href="javascript:void(0);">Danh mục</a>
        </li>
        <li class="active">Sửa lỗi contact</li>
    </ul>
</div>

<div class="page-content">
    <div class="page-header">
        <h1>Sửa lỗi contact
        </h1>
    </div>
    <!-- /.page-header -->



    <div class="row">
        <div class="col-xs-12">
            <!-- PAGE CONTENT BEGINS -->

            @using (Ajax.BeginForm("EditContactTmp", "Contact", new AjaxOptions() { HttpMethod = "POST" }, new { enctype = "multipart/form-data", @class = "form-horizontal", role = "form", id = "editcontacttmp" }))
            {
                @Html.AntiForgeryToken()
                <div class="form-group">
                    <div class="col-sm-12" id="alert">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1" style="text-align: left !important;">Id</label>
                    <div class="col-sm-9">
                        @Html.TextBoxFor(x => x.ContactId, new { @class = "col-xs-10 col-sm-5" })
                        @Html.HiddenFor(x => x.ImportId)
                    </div>

                </div>
                <div class="space-4"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1" style="text-align: left !important;">Tên</label>
                    <div class="col-sm-9">
                        @Html.TextBoxFor(x => x.Fullname, new { @class = "col-xs-10 col-sm-5" })

                    </div>

                </div>
                
                <div class="space-4"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1" style="text-align: left !important;">Ngày sinh</label>
                    <div class="col-sm-9">
                        @Html.TextBoxFor(x => x.Birth, new { @class = "col-xs-10 col-sm-5" })
                    </div>

                </div>
                <div class="space-4"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1" style="text-align: left !important;">Điện thoại 1</label>
                    <div class="col-sm-9">

                        @Html.TextBoxFor(x => x.Mobil1, new { @class = "col-xs-10 col-sm-5" })

                    </div>


                </div>
                <div class="space-4"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1" style="text-align: left !important;">Điện thoại 2</label>
                    <div class="col-sm-9">

                        @Html.TextBoxFor(x => x.Mobil1, new { @class = "col-xs-10 col-sm-5" })

                    </div>


                </div>
                <div class="space-4"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1" style="text-align: left !important;">Điện thoại cố định</label>
                    <div class="col-sm-9">

                        @Html.TextBoxFor(x => x.Tel, new { @class = "col-xs-10 col-sm-5" })

                    </div>

                    <div class="space-4"></div>

                </div>
                <div class="space-4"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1" style="text-align: left !important;">Email</label>
                    <div class="col-sm-9">

                        @Html.TextBoxFor(x => x.Email, new { @class = "col-xs-10 col-sm-5" })

                    </div>

                </div>
                <div class="space-4"></div>
                <div class="form-group">
                    <div class="col-sm-12">
                        <button type="submit" class="btn-import btn-primary" id="btnUpdate">Cập nhật</button>
                    </div>
                </div>
            }

            <table id="grid-table"></table>

            <div id="grid-pager"></div>

            <!-- PAGE CONTENT ENDS -->
        </div>
        <!-- /.col -->
    </div>
    <!-- /.row -->
</div>
<!-- /.page-content -->

<!-- inline scripts related to this page -->

<script type="text/javascript">

    $(document).ready(function () {
        //setupGrid("#grid-table", "#grid-pager", "admin/api/contacttmp/get", "admin/api/contacttmp/edit", "ContactTmpId", "ContactTmps", heades, model);

        $('#editcontacttmp').ajaxForm({
            beforeSend: function () {

            },
            uploadProgress: function (event, position, total, percentComplete) {

            },
            success: function () {

            },
            complete: function (xhr) {
                $("#alert").addClass("alert alert-block alert-success")
                $("#alert").html("Sửa lỗi thành công.");
                $("#btnUpdate").attr('disabled', 'disabled');
            }
        });
    });
</script>
